package lua;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.ByteBuf;
import lion.netty4.message.RequestMessageRaw;
import lion.netty4.message.SendToMessageRaw;
public final class LuaMessageMj{
	public static final class C2SMJCreateRoom{
		public short round_count;
		public byte dapai;
		public byte typehu;
		public byte prevent_cheat;
		public byte gold_coin;
		public int gold_rate;
		public byte cost_type;
		public static final int id = 1501;

		public static C2SMJCreateRoom parse(RequestMessageRaw request){
			C2SMJCreateRoom retObj = new C2SMJCreateRoom();
			try{
			retObj.round_count=request.readShort();
			retObj.dapai=request.readByte();
			retObj.typehu=request.readByte();
			retObj.prevent_cheat=request.readByte();
			retObj.gold_coin=request.readByte();
			retObj.gold_rate=request.readInt();
			retObj.cost_type=request.readByte();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJCreateRoom{
		public String room_id;
		public short round_count;
		public byte dapai;
		public byte typehu;
		public byte prevent_cheat;
		public int gold_rate;
		public byte cost_type;
		public byte[] ready;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1502);
			retMsg.writeString(this.room_id);
			retMsg.writeShort(this.round_count);
			retMsg.writeByte(this.dapai);
			retMsg.writeByte(this.typehu);
			retMsg.writeByte(this.prevent_cheat);
			retMsg.writeInt(this.gold_rate);
			retMsg.writeByte(this.cost_type);
			if(this.ready == null || this.ready.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.ready.length);
				for(int i=0;i<this.ready.length;i++){
			retMsg.writeByte(this.ready[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMJJoinRoom{
		public String room_id;
		public static final int id = 1503;

		public static C2SMJJoinRoom parse(RequestMessageRaw request){
			C2SMJJoinRoom retObj = new C2SMJJoinRoom();
			try{
			retObj.room_id=request.readString();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJJoinRoom{
		public String room_id;
		public short round_count;
		public MJMemberInfo[] members;
		public byte dapai;
		public byte typehu;
		public byte prevent_cheat;
		public byte gold_rate;
		public byte cost_type;
		public byte[] ready;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1504);
			retMsg.writeString(this.room_id);
			retMsg.writeShort(this.round_count);
			if(this.members == null || this.members.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.members.length);
				for(int i=0;i<this.members.length;i++){
					retMsg.writeInt(this.members[i].player_id);
					retMsg.writeString(this.members[i].name);
					retMsg.writeShort(this.members[i].sex);
					retMsg.writeString(this.members[i].headimg);
					retMsg.writeInt(this.members[i].level);
				}
			}
			retMsg.writeByte(this.dapai);
			retMsg.writeByte(this.typehu);
			retMsg.writeByte(this.prevent_cheat);
			retMsg.writeByte(this.gold_rate);
			retMsg.writeByte(this.cost_type);
			if(this.ready == null || this.ready.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.ready.length);
				for(int i=0;i<this.ready.length;i++){
			retMsg.writeByte(this.ready[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJSPlayerJoin{
		public short seat_index;
		public MJMemberInfo member_info;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1506);
			retMsg.writeShort(this.seat_index);
			if(this.member_info == null){
				retMsg.writeBool(false);
			}else{
				retMsg.writeBool(true);
					retMsg.writeInt(this.member_info.player_id);
					retMsg.writeString(this.member_info.name);
					retMsg.writeShort(this.member_info.sex);
					retMsg.writeString(this.member_info.headimg);
					retMsg.writeInt(this.member_info.level);
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJGameStart{
		public String room_server_host;
		public int room_server_port;
		public short[] Shaizi_num;
		public byte[] cards;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1510);
			retMsg.writeString(this.room_server_host);
			retMsg.writeInt(this.room_server_port);
			if(this.Shaizi_num == null || this.Shaizi_num.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.Shaizi_num.length);
				for(int i=0;i<this.Shaizi_num.length;i++){
			retMsg.writeShort(this.Shaizi_num[i]);
				}
			}
			if(this.cards == null || this.cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.cards.length);
				for(int i=0;i<this.cards.length;i++){
			retMsg.writeByte(this.cards[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class MJMemberInfo{
		public int player_id;
		public String name;
		public short sex;
		public String headimg;
		public int level;
		public MJMemberInfo(int pplayer_id,String pheadimg,int plevel,short psex,String pname){
			this.player_id=pplayer_id;
			this.headimg=pheadimg;
			this.level=plevel;
			this.sex=psex;
			this.name=pname;
		}
		public MJMemberInfo(){}
	}
	public static final class C2SMJDismissRoom{
		public static final int id = 1511;

		public static C2SMJDismissRoom parse(RequestMessageRaw request){
			C2SMJDismissRoom retObj = new C2SMJDismissRoom();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJDismissRoom{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1512);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJDismissRoom{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1514);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMJJoinRoomCheck{
		public String room_id;
		public static final int id = 1515;

		public static C2SMJJoinRoomCheck parse(RequestMessageRaw request){
			C2SMJJoinRoomCheck retObj = new C2SMJJoinRoomCheck();
			try{
			retObj.room_id=request.readString();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJJoinRoomCheck{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1516);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMJConnectRoom{
		public long sessionId;
		public static final int id = 1517;

		public static C2SMJConnectRoom parse(RequestMessageRaw request){
			C2SMJConnectRoom retObj = new C2SMJConnectRoom();
			try{
			retObj.sessionId=request.readLong();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJConnectRoom{
		public int is_success;
		public S2CMJConnectRoom(int pis_success){
			this.is_success=pis_success;
		}
		public S2CMJConnectRoom(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1518);
			retMsg.writeInt(this.is_success);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMJYaoshaizi{
		public static final int id = 1519;

		public static C2SMJYaoshaizi parse(RequestMessageRaw request){
			C2SMJYaoshaizi retObj = new C2SMJYaoshaizi();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJYaoshaizi{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1520);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJYaoshaizi{
		public short[] Shaizi_num;
		public byte[] cards;
		public byte card;
		public MJHuaPai[] huapai;
		public byte[] god_card;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1522);
			if(this.Shaizi_num == null || this.Shaizi_num.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.Shaizi_num.length);
				for(int i=0;i<this.Shaizi_num.length;i++){
			retMsg.writeShort(this.Shaizi_num[i]);
				}
			}
			if(this.cards == null || this.cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.cards.length);
				for(int i=0;i<this.cards.length;i++){
			retMsg.writeByte(this.cards[i]);
				}
			}
			retMsg.writeByte(this.card);
			if(this.huapai == null || this.huapai.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.huapai.length);
				for(int i=0;i<this.huapai.length;i++){
					if(this.huapai[i].cards == null || this.huapai[i].cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.huapai[i].cards.length);
				for(int cards_idx=0;cards_idx<this.huapai[i].cards.length;cards_idx++){
			retMsg.writeByte(this.huapai[i].cards[cards_idx]);
				}
			}
				}
			}
			if(this.god_card == null || this.god_card.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.god_card.length);
				for(int i=0;i<this.god_card.length;i++){
			retMsg.writeByte(this.god_card[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class MJHuaPai{
		public byte[] cards;
	}
	public static final class C2SMJChupai{
		public byte pai;
		public static final int id = 1523;

		public static C2SMJChupai parse(RequestMessageRaw request){
			C2SMJChupai retObj = new C2SMJChupai();
			try{
			retObj.pai=request.readByte();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJChupai{
		public short is_success;
		public short is_glod;
		public S2CMJChupai(short pis_glod,short pis_success){
			this.is_glod=pis_glod;
			this.is_success=pis_success;
		}
		public S2CMJChupai(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1524);
			retMsg.writeShort(this.is_success);
			retMsg.writeShort(this.is_glod);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJChupai{
		public short chupai_player_index;
		public byte pai;
		public PushMJChupai(short pchupai_player_index,byte ppai){
			this.chupai_player_index=pchupai_player_index;
			this.pai=ppai;
		}
		public PushMJChupai(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1526);
			retMsg.writeShort(this.chupai_player_index);
			retMsg.writeByte(this.pai);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class S2CMJMopai{
		public byte pai;
		public S2CMJMopai(byte ppai){
			this.pai=ppai;
		}
		public S2CMJMopai(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1528);
			retMsg.writeByte(this.pai);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjMopai{
		public short mopai_index;
		public byte pai;
		public PushMjMopai(short pmopai_index,byte ppai){
			this.mopai_index=pmopai_index;
			this.pai=ppai;
		}
		public PushMjMopai(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1530);
			retMsg.writeShort(this.mopai_index);
			retMsg.writeByte(this.pai);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjUserAction{
		public byte action;
		public byte out_card;
		public PushMjUserAction(byte pout_card,byte paction){
			this.out_card=pout_card;
			this.action=paction;
		}
		public PushMjUserAction(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1532);
			retMsg.writeByte(this.action);
			retMsg.writeByte(this.out_card);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMJUserDoAction{
		public byte action;
		public byte[] card;
		public static final int id = 1533;

		public static C2SMJUserDoAction parse(RequestMessageRaw request){
			C2SMJUserDoAction retObj = new C2SMJUserDoAction();
			try{
			retObj.action=request.readByte();
			int card_size = request.readInt();
				retObj.card = new byte[card_size];
				for(int i=0;i<card_size;i++){
					retObj.card[i]=request.readByte();
				}
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class PushMJUserDoAction{
		public byte user_index;
		public byte action;
		public byte[] out_card;
		public byte ProvideUser;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1534);
			retMsg.writeByte(this.user_index);
			retMsg.writeByte(this.action);
			if(this.out_card == null || this.out_card.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.out_card.length);
				for(int i=0;i<this.out_card.length;i++){
			retMsg.writeByte(this.out_card[i]);
				}
			}
			retMsg.writeByte(this.ProvideUser);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjBuHua{
		public byte user_index;
		public byte HuaCard;
		public PushMjBuHua(byte pHuaCard,byte puser_index){
			this.HuaCard=pHuaCard;
			this.user_index=puser_index;
		}
		public PushMjBuHua(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1536);
			retMsg.writeByte(this.user_index);
			retMsg.writeByte(this.HuaCard);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjGameOver{
		public byte winner_index;
		public byte card_eye;
		public short[] socre;
		public MJPlayerCard[] Cards;
		public byte Hu_type;
		public AnalyseItem analyseitem;
		public MJHuaPai[] huapai;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1538);
			retMsg.writeByte(this.winner_index);
			retMsg.writeByte(this.card_eye);
			if(this.socre == null || this.socre.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.socre.length);
				for(int i=0;i<this.socre.length;i++){
			retMsg.writeShort(this.socre[i]);
				}
			}
			if(this.Cards == null || this.Cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.Cards.length);
				for(int i=0;i<this.Cards.length;i++){
					if(this.Cards[i].cards == null || this.Cards[i].cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.Cards[i].cards.length);
				for(int cards_idx=0;cards_idx<this.Cards[i].cards.length;cards_idx++){
			retMsg.writeByte(this.Cards[i].cards[cards_idx]);
				}
			}
				}
			}
			retMsg.writeByte(this.Hu_type);
			if(this.analyseitem == null){
				retMsg.writeBool(false);
			}else{
				retMsg.writeBool(true);
					retMsg.writeByte(this.analyseitem.cbCardEye);
					retMsg.writeByte(this.analyseitem.bMagicEye);
					if(this.analyseitem.cbWeaveKind == null || this.analyseitem.cbWeaveKind.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.analyseitem.cbWeaveKind.length);
				for(int cbWeaveKind_idx=0;cbWeaveKind_idx<this.analyseitem.cbWeaveKind.length;cbWeaveKind_idx++){
			retMsg.writeByte(this.analyseitem.cbWeaveKind[cbWeaveKind_idx]);
				}
			}
					if(this.analyseitem.cbCenterCard == null || this.analyseitem.cbCenterCard.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.analyseitem.cbCenterCard.length);
				for(int cbCenterCard_idx=0;cbCenterCard_idx<this.analyseitem.cbCenterCard.length;cbCenterCard_idx++){
			retMsg.writeByte(this.analyseitem.cbCenterCard[cbCenterCard_idx]);
				}
			}
					if(this.analyseitem.cbCardData == null || this.analyseitem.cbCardData.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.analyseitem.cbCardData.length);
				for(int cbCardData_idx=0;cbCardData_idx<this.analyseitem.cbCardData.length;cbCardData_idx++){
					if(this.analyseitem.cbCardData[cbCardData_idx].cards == null || this.analyseitem.cbCardData[cbCardData_idx].cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.analyseitem.cbCardData[cbCardData_idx].cards.length);
				for(int cards_idx=0;cards_idx<this.analyseitem.cbCardData[cbCardData_idx].cards.length;cards_idx++){
			retMsg.writeByte(this.analyseitem.cbCardData[cbCardData_idx].cards[cards_idx]);
				}
			}
				}
			}
			}
			if(this.huapai == null || this.huapai.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.huapai.length);
				for(int i=0;i<this.huapai.length;i++){
					if(this.huapai[i].cards == null || this.huapai[i].cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.huapai[i].cards.length);
				for(int cards_idx=0;cards_idx<this.huapai[i].cards.length;cards_idx++){
			retMsg.writeByte(this.huapai[i].cards[cards_idx]);
				}
			}
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class AnalyseItem{
		public byte cbCardEye;
		public byte bMagicEye;
		public byte[] cbWeaveKind;
		public byte[] cbCenterCard;
		public cbCardData[] cbCardData;
	}
	public static final class cbCardData{
		public byte[] cards;
	}
	public static final class MJPlayerCard{
		public byte[] cards;
	}
	public static final class C2SMJNextRound{
		public static final int id = 1539;

		public static C2SMJNextRound parse(RequestMessageRaw request){
			C2SMJNextRound retObj = new C2SMJNextRound();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class PushMjNewGame{
		public byte[] cards;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1540);
			if(this.cards == null || this.cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.cards.length);
				for(int i=0;i<this.cards.length;i++){
			retMsg.writeByte(this.cards[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushRoundOver{
		public short[] score;
		public byte[] ZiMo;
		public byte[] JiePao;
		public byte[] DianPao;
		public byte[] MingGang;
		public byte[] AnGang;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1542);
			if(this.score == null || this.score.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.score.length);
				for(int i=0;i<this.score.length;i++){
			retMsg.writeShort(this.score[i]);
				}
			}
			if(this.ZiMo == null || this.ZiMo.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.ZiMo.length);
				for(int i=0;i<this.ZiMo.length;i++){
			retMsg.writeByte(this.ZiMo[i]);
				}
			}
			if(this.JiePao == null || this.JiePao.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.JiePao.length);
				for(int i=0;i<this.JiePao.length;i++){
			retMsg.writeByte(this.JiePao[i]);
				}
			}
			if(this.DianPao == null || this.DianPao.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.DianPao.length);
				for(int i=0;i<this.DianPao.length;i++){
			retMsg.writeByte(this.DianPao[i]);
				}
			}
			if(this.MingGang == null || this.MingGang.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.MingGang.length);
				for(int i=0;i<this.MingGang.length;i++){
			retMsg.writeByte(this.MingGang[i]);
				}
			}
			if(this.AnGang == null || this.AnGang.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.AnGang.length);
				for(int i=0;i<this.AnGang.length;i++){
			retMsg.writeByte(this.AnGang[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMjSystemVoice{
		public byte voice_index;
		public static final int id = 1543;

		public static C2SMjSystemVoice parse(RequestMessageRaw request){
			C2SMjSystemVoice retObj = new C2SMjSystemVoice();
			try{
			retObj.voice_index=request.readByte();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMjSystemVoice{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1544);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjSystemVoice{
		public byte voice_index;
		public byte play_index;
		public PushMjSystemVoice(byte pvoice_index,byte pplay_index){
			this.voice_index=pvoice_index;
			this.play_index=pplay_index;
		}
		public PushMjSystemVoice(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1546);
			retMsg.writeByte(this.voice_index);
			retMsg.writeByte(this.play_index);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMjVoicePlay{
		public ByteBuf content;
		public static final int id = 1547;

		public static C2SMjVoicePlay parse(RequestMessageRaw request){
			C2SMjVoicePlay retObj = new C2SMjVoicePlay();
			try{
			retObj.content=request.readByteArray();
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMjVoicePlay{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1548);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjVoicePlay{
		public byte player_index;
		public ByteBuf content;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1550);
			retMsg.writeByte(this.player_index);
			retMsg.writeByteArray(this.content);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMjBackRoomHall{
		public static final int id = 1551;

		public static C2SMjBackRoomHall parse(RequestMessageRaw request){
			C2SMjBackRoomHall retObj = new C2SMjBackRoomHall();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMjBackRoomHall{
		public S2CMJJoinRoom hall_info;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1552);
			if(this.hall_info == null){
				retMsg.writeBool(false);
			}else{
				retMsg.writeBool(true);
					retMsg.writeString(this.hall_info.room_id);
					retMsg.writeShort(this.hall_info.round_count);
					if(this.hall_info.members == null || this.hall_info.members.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.hall_info.members.length);
				for(int members_idx=0;members_idx<this.hall_info.members.length;members_idx++){
					retMsg.writeInt(this.hall_info.members[members_idx].player_id);
					retMsg.writeString(this.hall_info.members[members_idx].name);
					retMsg.writeShort(this.hall_info.members[members_idx].sex);
					retMsg.writeString(this.hall_info.members[members_idx].headimg);
					retMsg.writeInt(this.hall_info.members[members_idx].level);
				}
			}
					retMsg.writeByte(this.hall_info.dapai);
					retMsg.writeByte(this.hall_info.typehu);
					retMsg.writeByte(this.hall_info.prevent_cheat);
					retMsg.writeByte(this.hall_info.gold_rate);
					retMsg.writeByte(this.hall_info.cost_type);
					if(this.hall_info.ready == null || this.hall_info.ready.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.hall_info.ready.length);
				for(int ready_idx=0;ready_idx<this.hall_info.ready.length;ready_idx++){
			retMsg.writeByte(this.hall_info.ready[ready_idx]);
				}
			}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMjBackRoom{
		public static final int id = 1553;

		public static C2SMjBackRoom parse(RequestMessageRaw request){
			C2SMjBackRoom retObj = new C2SMjBackRoom();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMjBackRoom{
		public String room_id;
		public short round_count;
		public short current_round;
		public int create_time;
		public short[] score;
		public byte zhuangjia_index;
		public byte chupaiIndex;
		public short[] kaijinsazi;
		public byte Buhua_num;
		public MJMemberInfo[] members;
		public byte[] my_cards;
		public WeaveItems[] playWeaveItem;
		public MJHuaPai[] huapais;
		public byte[] PlayerCardsNum;
		public short Card_num;
		public byte god_card;
		public cbCardData[] pushedcards;
		public short bankuser_score;
		public byte action;
		public byte action_card;
		public byte last_play;
		public byte wait_game_start;
		public byte gold_state;
		public byte init_huacount;
		public byte dapai;
		public byte typehu;
		public byte prevent_cheat;
		public int gold_rate;
		public byte cost_type;
		public byte[] ready_state;
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1554);
			retMsg.writeString(this.room_id);
			retMsg.writeShort(this.round_count);
			retMsg.writeShort(this.current_round);
			retMsg.writeInt(this.create_time);
			if(this.score == null || this.score.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.score.length);
				for(int i=0;i<this.score.length;i++){
			retMsg.writeShort(this.score[i]);
				}
			}
			retMsg.writeByte(this.zhuangjia_index);
			retMsg.writeByte(this.chupaiIndex);
			if(this.kaijinsazi == null || this.kaijinsazi.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.kaijinsazi.length);
				for(int i=0;i<this.kaijinsazi.length;i++){
			retMsg.writeShort(this.kaijinsazi[i]);
				}
			}
			retMsg.writeByte(this.Buhua_num);
			if(this.members == null || this.members.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.members.length);
				for(int i=0;i<this.members.length;i++){
					retMsg.writeInt(this.members[i].player_id);
					retMsg.writeString(this.members[i].name);
					retMsg.writeShort(this.members[i].sex);
					retMsg.writeString(this.members[i].headimg);
					retMsg.writeInt(this.members[i].level);
				}
			}
			if(this.my_cards == null || this.my_cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.my_cards.length);
				for(int i=0;i<this.my_cards.length;i++){
			retMsg.writeByte(this.my_cards[i]);
				}
			}
			if(this.playWeaveItem == null || this.playWeaveItem.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.playWeaveItem.length);
				for(int i=0;i<this.playWeaveItem.length;i++){
					if(this.playWeaveItem[i].aplayer_WeaveItem == null || this.playWeaveItem[i].aplayer_WeaveItem.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.playWeaveItem[i].aplayer_WeaveItem.length);
				for(int aplayer_WeaveItem_idx=0;aplayer_WeaveItem_idx<this.playWeaveItem[i].aplayer_WeaveItem.length;aplayer_WeaveItem_idx++){
					retMsg.writeByte(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbWeaveKind);
					retMsg.writeByte(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbCenterCard);
					retMsg.writeByte(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbPublicCard);
					retMsg.writeByte(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].wProvideUser);
					if(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbCardData == null || this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbCardData.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbCardData.length);
				for(int cbCardData_idx=0;cbCardData_idx<this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbCardData.length;cbCardData_idx++){
			retMsg.writeByte(this.playWeaveItem[i].aplayer_WeaveItem[aplayer_WeaveItem_idx].cbCardData[cbCardData_idx]);
				}
			}
				}
			}
				}
			}
			if(this.huapais == null || this.huapais.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.huapais.length);
				for(int i=0;i<this.huapais.length;i++){
					if(this.huapais[i].cards == null || this.huapais[i].cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.huapais[i].cards.length);
				for(int cards_idx=0;cards_idx<this.huapais[i].cards.length;cards_idx++){
			retMsg.writeByte(this.huapais[i].cards[cards_idx]);
				}
			}
				}
			}
			if(this.PlayerCardsNum == null || this.PlayerCardsNum.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.PlayerCardsNum.length);
				for(int i=0;i<this.PlayerCardsNum.length;i++){
			retMsg.writeByte(this.PlayerCardsNum[i]);
				}
			}
			retMsg.writeShort(this.Card_num);
			retMsg.writeByte(this.god_card);
			if(this.pushedcards == null || this.pushedcards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.pushedcards.length);
				for(int i=0;i<this.pushedcards.length;i++){
					if(this.pushedcards[i].cards == null || this.pushedcards[i].cards.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.pushedcards[i].cards.length);
				for(int cards_idx=0;cards_idx<this.pushedcards[i].cards.length;cards_idx++){
			retMsg.writeByte(this.pushedcards[i].cards[cards_idx]);
				}
			}
				}
			}
			retMsg.writeShort(this.bankuser_score);
			retMsg.writeByte(this.action);
			retMsg.writeByte(this.action_card);
			retMsg.writeByte(this.last_play);
			retMsg.writeByte(this.wait_game_start);
			retMsg.writeByte(this.gold_state);
			retMsg.writeByte(this.init_huacount);
			retMsg.writeByte(this.dapai);
			retMsg.writeByte(this.typehu);
			retMsg.writeByte(this.prevent_cheat);
			retMsg.writeInt(this.gold_rate);
			retMsg.writeByte(this.cost_type);
			if(this.ready_state == null || this.ready_state.length == 0){
				retMsg.writeInt(0);
			}else{
				retMsg.writeInt(this.ready_state.length);
				for(int i=0;i<this.ready_state.length;i++){
			retMsg.writeByte(this.ready_state[i]);
				}
			}
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class WeaveItems{
		public WeaveItem[] aplayer_WeaveItem;
	}
	public static final class WeaveItem{
		public byte cbWeaveKind;
		public byte cbCenterCard;
		public byte cbPublicCard;
		public byte wProvideUser;
		public byte[] cbCardData;
	}
	public static final class C2SMjForceDismisroom{
		public static final int id = 1555;

		public static C2SMjForceDismisroom parse(RequestMessageRaw request){
			C2SMjForceDismisroom retObj = new C2SMjForceDismisroom();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMjForceDismisroom{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1556);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJForceDismissRoom{
		public byte player_index;
		public PushMJForceDismissRoom(byte pplayer_index){
			this.player_index=pplayer_index;
		}
		public PushMJForceDismissRoom(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1558);
			retMsg.writeByte(this.player_index);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class C2SMJReady{
		public static final int id = 1559;

		public static C2SMJReady parse(RequestMessageRaw request){
			C2SMJReady retObj = new C2SMJReady();
			try{
			}catch(Exception e){e.printStackTrace();}
			return retObj;
		}
	}
	public static final class S2CMJReady{
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1560);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMjReady{
		public byte player_index;
		public PushMjReady(byte pplayer_index){
			this.player_index=pplayer_index;
		}
		public PushMjReady(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1562);
			retMsg.writeByte(this.player_index);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
	public static final class PushMJNextRound{
		public byte player_index;
		public PushMJNextRound(byte pplayer_index){
			this.player_index=pplayer_index;
		}
		public PushMJNextRound(){}
		public SendToMessageRaw build(ByteBufAllocator alloc){
			try{
			SendToMessageRaw retMsg = new SendToMessageRaw(alloc, 1564);
			retMsg.writeByte(this.player_index);
			return retMsg;
			}catch(Exception e){e.printStackTrace();return null;}
		}
	}
}
